//
//  OrderTableCell.m
//  WuJieLive
//
//  Created by iMac on 2017/12/19.
//  Copyright © 2017年 zhk. All rights reserved.
//

#import "OrderTableCell.h"

@implementation OrderTableCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)bindDataWithModel:(OrderDetailModel *)model
{
    [self.leftImage sd_setImageWithURL:[NSURL URLWithString:model.goods_picture] placeholderImage:PlaceImage];
    self.nameLabel.text = model.goods_name;
    if (model.price.length > 0) {
        NSString * tempString = [NSString stringWithFormat:@"¥%@",model.price];
        self.oldPriceLabel.attributedText = [[NSMutableAttributedString alloc]initWithString:tempString attributes:@{NSFontAttributeName:FontSize(13),NSForegroundColorAttributeName:ColorWithHexString(@"333333"),NSStrikethroughStyleAttributeName:@1}];
    }
    self.nowPriceLabel.text = [NSString stringWithFormat:@"¥%@",model.price_coupon];
    self.numLabel.text = [NSString stringWithFormat:@"x%@",model.goods_number];
    self.specLabel.text = [NSString stringWithFormat:@"已选:%@",model.spec_name];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
